package com.woniu.zsd.platform.Netty;

import com.woniu.zsd.platform.Netty.NettyServer;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Component
public class NettyServerRunner implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) {
        new Thread(() -> {
            try {
                // 启动 Netty 服务器，端口设为 8081
                new NettyServer(9081).start();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }).start();
    }
}
